<template>
  <div style="background:#cce5ff;padding:8px;border-radius:8px;margin-bottom:8px;">
  <!-- <PmpItemName :id="componentId" v-if="componentId"></PmpItemName> -->

  

  <Bytemd :id="props.c"></Bytemd>
  <!-- <component :is="currentComponent"></component> -->
  
  

  </div>
</template>
<script setup>
import pmpHooks from '@/hooks/PmpHooks.js'
import { ref, onMounted, markRaw, watch } from 'vue'
import PmpItemName from '@/components/PmpItemName.vue'

import Bytemd from '@/components/mdeditor/bytemd/Bytemd.vue'
// import pControlCost from '@/components/ItemDetail/pControlCost.vue'
// import ttExpertJudge from '@/components/ItemDetail/ttExpertJudge.vue'

// const viewMap = {
//   pControlCost,
//   ttExpertJudge,
// }

const props = defineProps({
  c: {
    type: String,
    default: '',
  },
})
// const currentComponent = ref()
const componentId = ref('')
function changeItem(value) {
  // if (value) {
  //   if (pmpHooks.viewMap[value]) {
  //     currentComponent.value = markRaw(pmpHooks.viewMap[value].c)
  //     componentId.value = value
  //   }
  // }
}
watch(() => props.c, changeItem)

onMounted(() => {
  changeItem(props.c)
})
</script>
<style scoped></style>
